<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <form action="" id="myform">
    <input type="text">
    <br>
    <input type="radio">
    <br>
    <input type="password">
    <br>
    <input type="checkbox">
    <br>
    <input type="button">
    <br>
    <input type="file">
    <br>
    <textarea name="" id="" cols="30" rows="10"></textarea>
    <br>
    <br>
    <select name="" id="">
      <option value="11">111</option>
    </select>
    <input type="submit">
    <br>
    <input type="reset">
    <input type="image"
      src="https://pics5.baidu.com/feed/8b82b9014a90f6036527cd9d19efd813b251ed5e.jpeg?token=55300f70669cbcfadc448a2bd796c31f">
    <br>
  </form>
  <script src="./jquery-3.4.1.min.js"></script>
  <script>
    // :text 获取输入框
    $("#myform :text").css("background", "blue")
    // :checbox 获取复选框
    // attr(属性,属性值) attr({属性：属性值,属性：属性值})
    $("#myform :checkbox").attr("checked", true)
    //:password 密码框 :file 文件框  :submit 提交按钮 :reset 重置按钮
    // :image 图片按钮 :button按钮 
    // :input 获取所有表单元素
    console.log($("#myform :input"))
  </script>
</body>

</html>